Skip to content

Name the Android renderer's frame, upload and decode work in Perfetto - #36

Merged
Xget7 merged 1 commit into
fix/android-dev-profilingfrom
perf/android-trace-sections
Oct 20, 2026
Merged

Xget7 merged 1 commit into
fix/android-dev-profilingfrom
perf/android-trace-sections

Conversation

@Xget7

@Xget7 Xget7 commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

The Android library names its render-thread and loader work in Perfetto through the NDK ATrace API.

SplatKitRender
  SplatKit frame                      AndroidEngine::render
    SplatKit wait for frame slot      VulkanFrameLoop::beginFrame (fence)
    SplatKit encode compute           cull, LOD and radix sort dispatches
    SplatKit submit and present       vkQueueSubmit + vkQueuePresentKHR
  SplatKit upload world | upload tile
SplatKitLoader
  SplatKit decode world | decode collider   (JNI loaders)
process track
  SplatKit benchmark                  async slice over the benchmark turn

The names live in engine/TraceSection.h.
SplatEngine::benchmarkRunning() tells the Android engine when to open and close the async slice.

Evidence

Physical Xiaomi Mi 9 (Adreno 640, Vulkan 1.1.128, Android 11), release build under Perfetto.

  • Before: the trace held no app slices, so the frame could not be split into its parts.
    After: every slice above shows up on the right thread.
    A 20 s benchmark window read:
SplatKit frame                 mean  12.79 ms  p95  24.92
SplatKit wait for frame slot   mean   0.37 ms  p95   0.65
SplatKit encode compute        mean   0.17 ms  p95   0.28
SplatKit submit and present    mean  10.12 ms  p95  21.91

scripts/lint-cpp.sh (clang-format and clang-tidy) is clean.
Skipped: the engine C++ unit tests were not run; benchmarkRunning() is a one-line accessor.

Merge Danger

Door: two-way

Blast Radius: android-runtime

While nothing is tracing the app, each section costs one flag check, which is not measurable next to a 20 ms frame.
SplatEngine.h is shared with iOS, and the change only adds an accessor.

TraceSection wraps ATrace sections on the render thread (frame, wait for
a frame slot, compute encode, submit and present, world and tile
uploads) and on the loader (world and collider decode). An async
"SplatKit benchmark" slice spans the benchmark turn, read through the
new SplatEngine::benchmarkRunning(), so an analysis can measure exactly
that window. Each section costs a flag check while nothing traces.
@Xget7
Xget7 added this pull request to stack #38 October 20, 2026 04:17
@Xget7
Xget7 marked this pull request as ready for review October 20, 2026 04:20
@Xget7
Xget7 merged commit bcfb5ea into main Oct 20, 2026
17 checks passed
@Xget7
Xget7 deleted the perf/android-trace-sections branch October 20, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant